home *** CD-ROM | disk | FTP | other *** search
/ Item MB Quick & Easy 2.0 / Item MB Quick & Easy 2.0.iso / mbfacad / 28100au.lsp < prev    next >
Text File  |  1998-03-15  |  6KB  |  145 lines

  1. ;=============Wechselrahmen
  2.  
  3.  
  4. (defun C:28100AU ( / A Ant BName G G1 P1 T1 TA Wi Wg)
  5.      (princ "\n\nWECHSELRAHMEN\n")
  6.      (EAITvari)
  7.      (EAITvars)
  8.      (setvar "OSMODE" 0)
  9.      (setvar "ORTHOMODE" 0)
  10.      (EAITmsg "mb_mld12" "\n" "029" " : ")       ;Arbeitstisch waehlen :
  11.      (setq G (car (entsel " ")))
  12.   (if (= (cdr (assoc 0 ( entget G ))) "INSERT")
  13.    (progn                            
  14.     (setq G1 (cdr (assoc 2 ( entget G ))))    ;Name des Arbeitstisches
  15.     
  16.      (setq Wi 0 Wg 0)
  17.     
  18.     (command EAITbks EAITbel G)
  19.     (cond 
  20. ;-------Vorderansicht    
  21.           ((OR(= G1 "26700V1")(= G1 "26800V1")(= G1 "26900V1")(= G1 "27000V1")
  22.              (= G1 "27100V1")(= G1 "27200V1")(= G1 "27300V1")(= G1 "27400V1"))
  23.              
  24.             (cond ((OR(= G1 "26700V1")(= G1 "26800V1")(= G1 "26900V1")(= G1 "27000V1"))
  25.                     (setq P1 (polar '(0 0) (+ Wi(/ Pi 2)) 900))     
  26.                  )
  27.                  ((OR(= G1 "27100V1")(= G1 "27200V1")(= G1 "27300V1")(= G1 "27400V1"))
  28.                     (setq P1 (polar '(0 0) (+ Wi(/ Pi 2)) 1000))
  29.                  )
  30.                );cond
  31.             (cond ((OR(= G1 "26700V1")(= G1 "27100V1"))
  32.                                        (EAITDBL "0028100")
  33.                  )
  34.                  ((OR(= G1 "26800V1")(= G1 "26900V1")(= G1 "27200V1")(= G1 "27300V1"))
  35.                                        (EAITDBL "0028200")
  36.                  )
  37.                  ((OR(= G1 "27000V1")(= G1 "27400V1"))
  38.                                        (EAITDBL "0028300")
  39.                  )            
  40.             );cond
  41.             
  42.              ;-----------------------------------------------Wechselrahmen einfügen
  43.  
  44.             (command EAITege (strcat  EAITpfn (substr EAITnr 3 5) "V1") P1 "" "" Wg)
  45.                (command EAITege (strcat EAITpfn "EAITinfo") (polar P1 (+ Wi (EAITgib 11)) 109) "" "" ""
  46.                                 EAITbez1 EAITbez2 EAITlie1 EAITlie2 EAITwer1 EAITwer2 (rtos EAITl1 2 1) (rtos EAITb1 2 1) EAITnr
  47.                )
  48.           );1.cond-Fall
  49.          
  50. ;------Draufsicht
  51.  
  52.           ((OR(= G1 "26700D1")(= G1 "26800D1")(= G1 "26900D1")(= G1 "27000D1")
  53.              (= G1 "27100D1")(= G1 "27200D1")(= G1 "27300D1")(= G1 "27400D1"))
  54.             
  55.                        (initget (strcat (EAITmg "mb_mld13" "008") " " (EAITmg "mb_mld13" "009")))
  56.             (EAITmsg "mb_mld12" "\n   " "040" " ")(EAITmsg "mb_mld13" nil "008" "/<")(EAITmsg "mb_mld13" nil "009" ">")
  57.                                                 ;Ausleger eingesetzt ? Ja/<Nein>
  58.                        (setq Ant (getreal))
  59.             (if (/= Ant (EAITmg "mb_mld13" "008"))(setq A 0)(setq A 40))
  60.             
  61.             (setq P1 (polar '(0 0) (- Wi (/ Pi 2)) A))
  62.             
  63.             (cond ((OR(= G1 "26700D1")(= G1 "27100D1"))
  64.                                        (EAITDBL "0028100")
  65.                  )
  66.                  ((OR(= G1 "26800D1")(= G1 "26900D1")(= G1 "27200D1")(= G1 "27300D1"))
  67.                                        (EAITDBL "0028200")
  68.                  )
  69.                  ((OR(= G1 "27000D1")(= G1 "27400D1"))
  70.                                        (EAITDBL "0028300")
  71.                  )            
  72.             );cond
  73.             
  74.              ;-----------------------------------------------Wechselrahmen zeichnen
  75.  
  76.             (command EAITege (strcat EAITpfn (substr EAITnr 3 5) "D1") P1 "" "" Wg)
  77.                (command EAITege (strcat EAITpfn "EAITinfo") (polar P1 (+ Wi (EAITgib 315)) 150) "" "" ""
  78.                                 EAITbez1 EAITbez2 EAITlie1 EAITlie2 EAITwer1 EAITwer2 (rtos EAITl1 2 1) (rtos EAITb1 2 1) EAITnr
  79.                )
  80.           );2.cond-Fall
  81.  
  82. ;-------Seitenansicht    
  83.           ((OR(= G1 "26700S1")(= G1 "26800S1")(= G1 "26900S1")(= G1 "27000S1")
  84.              (= G1 "27100S1")(= G1 "27200S1")(= G1 "27300S1")(= G1 "27400S1"))
  85.  
  86.                        (initget (strcat (EAITmg "mb_mld13" "008") " " (EAITmg "mb_mld13" "009")))
  87.             (EAITmsg "mb_mld12" "\n   " "040" " ")(EAITmsg "mb_mld13" nil "008" "/<")(EAITmsg "mb_mld13" nil "009" ">")
  88.                                                 ;Ausleger eingesetzt ? Ja/<Nein>
  89.                        (setq Ant (getreal))
  90.             (if (/= Ant (EAITmg "mb_mld13" "008"))(setq A 0)(setq A 40))
  91.              
  92.             (cond ((OR(= G1 "26700S1")(= G1 "26800S1")(= G1 "26900S1")(= G1 "27000S1"))
  93.                     (setq P1 (polar (polar '(0 0) (+ Wi(/ Pi 2)) 900) Wi (+ 4 A)))
  94.                  )
  95.                  ((OR(= G1 "27100S1")(= G1 "27200S1")(= G1 "27300S1")(= G1 "27400S1"))
  96.                     (setq P1 (polar (polar '(0 0) (+ Wi(/ Pi 2)) 1000) Wi (+ 4 A)))
  97.                  )
  98.                );cond
  99.             (cond ((OR(= G1 "26700S1")(= G1 "27100S1"))
  100.                                        (EAITDBL "0028100")
  101.                  )
  102.                  ((OR(= G1 "26800S1")(= G1 "26900S1")(= G1 "27200S1")(= G1 "27300S1"))
  103.                                        (EAITDBL "0028200")
  104.                  )
  105.                  ((OR(= G1 "27000S1")(= G1 "27400S1"))
  106.                                        (EAITDBL "0028300")
  107.                  )            
  108.             );cond
  109.             
  110.              ;-----------------------------------------------Wechselrahmen zeichnen
  111.  
  112.             (command EAITege (strcat EAITpfn (substr EAITnr 3 5) "S1") P1 "" "" Wg)
  113.                (command EAITege (strcat EAITpfn "EAITinfo") (polar P1 (+ Wi (EAITgib 75)) 31) "" "" ""
  114.                                 EAITbez1 EAITbez2 EAITlie1 EAITlie2 EAITwer1 EAITwer2 (rtos EAITl1 2 1) (rtos EAITb1 2 1) EAITnr
  115.                )
  116.             
  117.           );3.cond-Fall
  118.  
  119.  
  120.            (T  (EAITmsg "mb_mld12" "\n\n   " "030" nil)   ;Gewaehlter Block ist kein gültiger Arbeitstisch !
  121.         (EAITmsg "mb_mld12" "\n   " "039" nil)     ;Kein automatisches Einfügen des Wechselrahmens möglich !
  122.          )
  123.          
  124.     );cond
  125.     (command EAITbks EAITbvo)
  126.    );progn
  127.  
  128.  
  129.  
  130. ;-----------------------Meldung wenn Arbeitstisch kein Block mehr
  131.    (progn
  132.    (EAITmsg "mb_mld12" "\n\n   " "032" nil)   ;Arbeitstisch ist kein Block mehr !
  133.    (EAITmsg "mb_mld12" "\n   " "039" nil)     ;Kein automatisches Einfügen des Wechselrahmens möglich !
  134.    );Meldung
  135.     
  136.   );if 
  137.     
  138.     
  139.      (EAITvarz2)
  140.      (princ)
  141.     
  142. );defun WECHSELRAHMEN
  143.  
  144. (princ)
  145.